<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/dbtest/warehouse/c_wms_container_t.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :details="details"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/dbtest/warehouse/c_wms_container_t.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'id',
                footer: "Foots",
                cnName: '容器管理',
                name: 'warehouse/c_wms_container_t',
                newTabEdit: false,
                url: "/c_wms_container_t/",
                sortName: "CreateTime"
            });
            const editFormFields = ref({"container_code":"","container_name":"","container_type":"","container_usage":"","container_status":"","enable":"","container_weight":"","capacity":"","is_outside":"","remarks":""});
            const editFormOptions = ref([[{"title":"容器编码","field":"container_code"},
                               {"title":"容器名称","field":"container_name"}],
                              [{"dataKey":"仓储容器类型","data":[],"title":"容器类型","required":true,"field":"container_type","type":"select"},
                               {"dataKey":"容器用途","data":[],"title":"容器用途","required":true,"field":"container_usage","type":"select"}],
                              [{"dataKey":"enable","data":[],"title":"占用","required":true,"field":"container_status","type":"switch"},
                               {"dataKey":"enable","data":[],"title":"启用","required":true,"field":"enable","type":"switch"}],
                              [{"title":"容器重量","field":"container_weight","type":"decimal"},
                               {"title":"装载量","field":"capacity","type":"decimal"}],
                              [{"dataKey":"enabled","data":[],"title":"外部容器","field":"is_outside","type":"switch"},
                               {"title":"备注","field":"remarks","type":"textarea"}]]);
            const searchFormFields = ref({"container_code":"","container_name":"","container_type":"","container_usage":"","container_status":"","enable":""});
            const searchFormOptions = ref([[{"title":"容器编码","field":"container_code"},{"title":"容器名称","field":"container_name"},{"dataKey":"仓储容器类型","data":[],"title":"容器类型","field":"container_type","type":"select"}],[{"dataKey":"容器用途","data":[],"title":"容器用途","field":"container_usage","type":"select"},{"dataKey":"enable","data":[],"title":"占用","field":"container_status","type":"select"},{"dataKey":"enable","data":[],"title":"启用","field":"enable","type":"select"}]]);
            const columns = ref([{field:'container_code',title:'容器编码',type:'string',link:true,width:120,align:'left'},
                       {field:'container_name',title:'容器名称',type:'string',width:120,align:'left'},
                       {field:'container_type',title:'容器类型',type:'int',bind:{ key:'仓储容器类型',data:[]},width:110,require:true,align:'left'},
                       {field:'container_usage',title:'容器用途',type:'int',bind:{ key:'容器用途',data:[]},width:110,require:true,align:'left'},
                       {field:'container_status',title:'占用',type:'int',bind:{ key:'enabled',data:[]},width:110,require:true,align:'left'},
                       {field:'occupant_user',title:'占用人',type:'string',width:120,align:'left'},
                       {field:'occupant_doc_no',title:'占用单据',type:'string',width:120,align:'left'},
                       {field:'enabled',title:'启用',type:'sbyte',bind:{ key:'enabled',data:[]},width:110,require:true,align:'left'},
                       {field:'container_weight',title:'容器重量',type:'decimal',width:110,align:'left'},
                       {field:'capacity',title:'装载量',type:'decimal',width:110,align:'left'},
                       {field:'is_outside',title:'外部容器',type:'string',bind:{ key:'enabled',data:[]},width:110,align:'left'},
                       {field:'id',title:'ID',type:'string',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'remarks',title:'备注',type:'string',width:150,align:'left'},
                       {field:'IsValid',title:'是否有效',type:'string',width:110,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人名',type:'string',width:100,align:'left'},
                       {field:'CreateId',title:'创建人',type:'string',width:80,hidden:true,align:'left'},
                       {field:'CreateTime',title:'创建时间',type:'datetime',width:110,align:'left'},
                       {field:'Modifier',title:'修改人名',type:'string',width:100,align:'left'},
                       {field:'ModifyId',title:'修改人',type:'string',width:80,hidden:true,align:'left'},
                       {field:'ModifyTime',title:'修改时间',type:'datetime',width:110,align:'left'},
                       {field:'warehouse_id',title:'仓库',type:'string',width:120,hidden:true,require:true,align:'left'}]);
            const detail = ref({columns:[]});
            const details = ref([]);
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
                details
            };
        },
    });
</script>
@/extension/demoproject/warehouse/c_wms_container_t.jsx